d**d 发帖数: 389 | 1 $ g++ --version
g++ (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)
code 如下:
#include
using namespace std;
class Animal
{
protected:
string m_strName;
Animal(string strName):m_strName(strName)
{
};
public:
string GetName(){return m_strName;};
virtual const char* Speak(){return "???";};
};
class Cat:public Animal
{
public:
Cat(string strName): Animal(strName)
{
}
virtual const char *Speak(){return "Meow";};
};
clas... 阅读全帖 |
|
s****n 发帖数: 1750 | 2 一个.Net 面试问道的问题,一直没想到很满意的答案,写上来,看看各位达人有什么
建议。
用程序来实现一个many-to-many的数据表:一个employee可以有N个manager,一个
manager有N个employee.Manager也是一种employee 假设用户名就是Unique ID
要求:
1.实现如下几个函数:GetAllManager(),GetAllManager(strName),GetAllEmployee(),
GetAllEmployee(strName).
2. 不要写专门的类去实现manager和emplyee.
3. 尽量用.Net里的data type.
4. 保证少占内存和执行速度。 |
|
r*******o 发帖数: 38 | 3 Here is the form to get username
the following code is to write the username to the cookie and write it out,
but the page only write hello!. WHY! Do I have to put it online. I use IIS as
server right now. Thanks!
<% dim stname
stname= request("name")
response.cookies("username") =strname%>
hello<%=strname%>!
|
|